
    <!DOCTYPE html>
    <html>
    <head>
        <title>量化策略回测报告</title>
        <script src="./js/plotly-latest.min.js"></script>
        <link rel="stylesheet" type="text/css"  href="./css/layui.css">
        <style>
            body { font-family: Arial; margin: 20px }
            .card { border: 1px solid #ddd; padding: 15px; margin: 10px; border-radius: 5px }
            .flex { display: flex; flex-wrap: wrap }
            h2 { color: #333 }
        </style>
    </head>
    <body>
        <!-- <h1>策略回测报告</h1> -->



        <table class="layui-table">
            <tr>
                <td class="label">回测周期</td>
                <td colspan="3">2020-01-03 至 2020-01-02 (-0.0027378507871321013年)</td>
            </tr>
            <tr>
                <td  class="label">期末资产</td>
                <td > ¥99981.30</td>
                <td  class="label">总交易次数</td>
                <td > 6</td>
            </tr>
            <tr>
                <td  class="label">累计收益率</td>
                <td > ¥99981.30</td>
                <td  class="label">总盈亏</td>
                <td > 6</td>
            </tr>
            <tr>
                <td  class="label">年化收益率</td>
                <td > ¥99981.30</td>
                <td  class="label">胜率</td>
                <td > 6</td>
            </tr>
            <tr>
                <td  class="label">夏普比率</td>
                <td > ¥99981.30</td>
                <td  class="label">连胜/连败</td>
                <td > 6</td>
            </tr>
            <tr>
                <td  class="label">最大回撤</td>
                <td > ¥99981.30</td>
                <td  class="label">平均盈亏</td>
                <td > 6</td>
            </tr>
        </table>




        <div class="flex">
            <div class="card" style="width: 45%">
                <p><b>关键指标</b></p>
                <p><b>回测周期:</b> 2020-01-03 至 2020-01-02 (-0.0027378507871321013年)</p>
                <p><b>期末资产:</b> ¥99981.30</p>
                <p><b>累计收益率:</b> -0.02%</p>
                <p><b>年化收益率:</b> -1.56%</p>
                <p><b>夏普比率:</b> 0.00</p>
                <p><b>最大回撤:</b> 0.06% 
                (持续 167天)</p>
            </div>
            
            <div class="card" style="width: 45%">
                <h2>交易统计</h2>
                <p><b>总交易次数:</b> 6</p>
                <p><b>总盈亏:</b> -18.700000000000728</p>
                <p><b>胜率:</b> 33.33%</p>
                <p><b>连胜/连败:</b> 1/2</p>
                <p><b>平均盈亏:</b> ¥-3.12</p>
                <p><b>多空比例:</b> 100.00% 多头</p>
            </div>
        </div>
        
        <div id="returnsChart" style="width:900px;height:400px;"></div>
        <script>
            var returns = []
            Plotly.newPlot('returnsChart', [{
                x: returns.dates,
                y: returns.values,
                type: 'line'
            }], {title: '累计收益率曲线'});
        </script>
    </body>
    </html>
    